﻿<!--{eval $_TPL['titles'] = array('管理我的应用');}-->
<!--{template header}-->

<!--{if $_GET['op'] == 'menu'}-->

<h2 class="title"><img src="image/app/setting.gif">管理我的应用</h2>
<div class="tabs_header">
	<ul class="tabs">
		<li class="active"><a href="cp.php?ac=userapp&op=menu"><span>管理我的应用</span></a></li>
		<li class="null"><a href="cp.php?ac=userapp&my_suffix=%2Fapp%2Flist">添加新应用</a></li>
	</ul>
</div>

<div id="content">
<style type="text/css">
.DragBox {
	 height:20px;padding: 7px; z-index:9999; border-bottom:1px dotted #CDCDCD; width:500px;padding-left:30px;background:url(image/drag.gif) no-repeat 7px 8px;
}
.l_option{float:left;}

.OverDragBox {
	height:20px;padding: 7px;  cursor: move;border-bottom:1px dotted #CDCDCD;width:500px;padding-left:30px;background:#efefef url(image/drag.gif) no-repeat 7px 8px;
}

.DragDragBox {
	height:20px;padding: 7px; cursor:move; opacity: 0.5;filter: alpha(opacity=50); border:1px dashed #BDD6FB;width:500px; color:#666; padding-left:30px;background:#efefef url(image/drag.gif) no-repeat 7px 8px;
}

</style>
<!--{if $my_default_userapp}-->
<div class="DragBox mt15" style="padding-left:30px;padding-bottom:0px;background:none;">
	<div class="l_option" style="width:350px;">默认应用</div>
	<div class="l_option" style="width:100px;">&nbsp;</div>
	<div class="l_option" style="width:50px;">&nbsp;</div>
</div>
<div>
	<!--{loop $my_default_userapp $value}-->
	<div class="DragBox mt15" style="padding-left:30px;padding-bottom:0px;background:none;">
		<div class="l_option" style="width:350px;"><img src="http://appicon.manyou.com/icons/$value[appid]"> <a href="userapp.php?id=$value[appid]">$value[appname]</a></div>
		<div class="l_option" style="width:100px;"><a href="cp.php?ac=userapp&amp;my_suffix=%2Fuserapp%2FmodifyPrivacy%3FappId%3D$value[appid]">编辑设置</a></div>
		<div class="l_option" style="width:50px;">
			<a href="cp.php?ac=userapp&op=deleteapp&appid=$value[appid]" id="del_default_app_$value[appid]" onclick="ajaxmenu(event, this.id)">移除</a>
		</div>
	</div>
	<!--{/loop}-->
</div>
<br />
<!--{/if}-->

<!--{if $my_userapp}-->

	<script language="javascript" type="text/javascript" src="source/script_drag.js"></script>
	
	
	<div class="DragBox mt15" style="padding-left:30px;padding-bottom:0px;background:none;">
		<div class="l_option" style="width:350px;">我的应用</div>
		<div class="l_option" style="width:100px;">&nbsp;</div>
		<div class="l_option" style="width:50px;">&nbsp;</div>
	</div>
	
	<form id="userappform" name="userappform" method="post" action="cp.php?ac=userapp&op=menu">
		<fieldset id="Drags0" style="border:none;">
			<div id="DragContainer0">
				<!--{loop $my_userapp $key $value}-->
					<div class="DragBox" overclass="OverDragBox"  dragclass="DragDragBox" id="$key" style="padding-bottom:0;">
						<div class="l_option" style="width:350px;">
							<img src="http://appicon.manyou.com/icons/$value[appid]"> <a href="userapp.php?id=$value[appid]">$value[appname]</a>(<a href="cp.php?ac=userapp&my_suffix=%2Fuserapp%2Fabout%3FappId%3D$value[appid]" target="_blank">介绍</a>)
							<input type="hidden" name="order[]" value="$value[appid]">
						</div>
						<div class="l_option" style="width:100px;">
							<a href="cp.php?ac=userapp&amp;my_suffix=%2Fuserapp%2FmodifyPrivacy%3FappId%3D$value[appid]">编辑设置</a>
						</div>
						<div class="l_option" style="width:50px;">
							<a href="cp.php?ac=userapp&op=deleteapp&appid=$value[appid]" id="del_app_$value[appid]" onclick="ajaxmenu(event, this.id)">移除</a>
						</div>
					</div>
				<!--{/loop}-->
			</div>
		</fieldset>
		<script type="text/javascript">init_drag2();</script>

		
	<center>
	<br>
	左侧菜单显示个性应用的数量
	<select name="menunum">
		<option value="5"$menunum[5]>5</option>
		<option value="10"$menunum[10]>10</option>
		<option value="15"$menunum[15]>15</option>
		<option value="20"$menunum[20]>20</option>
		<option value="25"$menunum[25]>25</option>
		<option value="30"$menunum[30]>30</option>
		<option value="999"$menunum[999]>全部</option>
	</select> &nbsp;
	<input type="submit" name="ordersubmit" value="保存设置" class="submit" /></center>
	<input type="hidden" name="formhash" value="<!--{eval echo formhash();}-->" />
	</form>
<!--{else}-->
	<div class="c_form">还没有可以自定义的应用菜单，请先<a href="cp.php?ac=userapp&my_suffix=%2Fapp%2Flist">添加新应用</a></div>
<!--{/if}-->
</div>

<div id="sidebar">
	<div class="c_mgs"><div class="ye_r_t"><div class="ye_l_t"><div class="ye_r_b"><div class="ye_l_b">
		<strong>使用助手</strong>：
		<br>1.您可以自由拖拽 <img src="image/drag.gif" /> 排列应用顺序；
		<br>2.排列越上面的应用在菜单中显示的越靠前；
		<br>3.您可以管理您已经添加的应用，可以设置某个应用的权限、移除某个应用；
		<br>4.如果您要管理您的空间、日志、相册等隐私，请到您的空间隐私设置；
		<br>5.默认应用只能进行相关设置与移除，但移除后仍然会显示在你的左侧菜单中。
	</div></div></div></div></div>
</div>

<!--{elseif $_GET['op'] == 'deleteapp'}-->

<h1>移除应用</h1>
<a href="javascript:hideMenu();" class="float_del" title="关闭">关闭</a>
<div class="popupmenu_inner" id="$_GET[appId]">
	<form id="reportform" name="reportform" method="post" action="cp.php?ac=userapp&my_suffix=%2Fuserapp%2Funinstall%3FappId%3D$_GET[appid]">
		<p>移除后，您的个人主页、开始菜单、管理我的应用<br/>将不会显示此应用，您以后需要重新添加才能使用。<br>确定继续吗？</p>
		<p class="btn_line">
			<input type="hidden" name="refer" value="$_SGLOBAL[refer]" />
			<input type="submit" name="delappsubmit" value="确定" class="submit" />
		</p>
	<input type="hidden" name="formhash" value="<!--{eval echo formhash();}-->" />
	</form>
</div>
<!--{else}-->

<script language="JavaScript" src="source/script_cookie.js"></script>
<script type="text/javascript" src="http://static.manyou.com/scripts/my_iframe.js"></script>
<script language="javascript">
var prefixURL = "$my_prefix";
var suffixURL = "$my_suffix";
var queryString = '';
var url = "{$url}";
var oldHash = null;
var timer = null;
var server = new MyXD.Server("ifm0");
server.registHandler('iframeHasLoaded');
server.registHandler('setTitle');
server.start();

function iframeHasLoaded(ifm_id) {
        MyXD.Util.showIframe(ifm_id);
        //document.getElementById(ifm_id).style.display = '';
        document.getElementById('loading').style.display = 'none';
}

function  htmlspecialchars_decode(string) {
	string = string.toString();
	string = string.replace(/&amp;/g, '&');
	string = string.replace(/&lt;/g, '<');
	string = string.replace(/&gt;/g, '>');
	string = string.replace(/&quot;/g, '"');
	string = string.replace(/&#039;/g, "'");
	return string;

}

function setTitle(x) {
	<!--{eval $my_site_name=htmlspecialchars($_SCONFIG['sitename'], ENT_QUOTES);}-->
	var my_site_name = htmlspecialchars_decode('{$my_site_name}');

	x = htmlspecialchars_decode(x);
	document.title = x + ' - <!--{if $space}--><!--{eval echo saddslashes($_SN[$space[uid]])}--> - <!--{/if}-->' + my_site_name + ' - Powered by UCenter Home';
}

</script>
<iframe id="ifm0" frameborder="0" width="810" scrolling="no" height="810" style="position:absolute; top:-5000px; left:-5000px;" src="{$url}"></iframe>


<div id="mx2note" style="display:none; padding:150px 0 150px 0; margin:1px; text-align:center; background-color:#FFFFBF;  font-size:12px; line-height:14px; color:#DB0000; letter-spacing:1px;">
	本页面暂时不支持遨游2浏览器, 请您使用IE或Firefox, 我们对由此给您带来的不便深表歉意
</div>
<div id="loading" style="display:block; padding:100px 0 100px 0;text-align:center;color:#999999;font-size:12px;">
	<img src="image/my/loading.gif" alt="loading..." style="position:relative;top:11px;"/>  页面加载中...
</div>

<!--{/if}-->

<!--{template footer}-->
